#include "DoorExitTrigger.h"
#include "MyGame.h"
#include "Level.h"

//----------------------
// public declarations
//----------------------

void DoorExitTrigger::hit(const SimpleDirection dir, BaseUnit* player, CRstring parameter)
{
    Hero* hero = (Hero*)player;
    // make sure up is pressed and hero is not in air
    if (hero->getLevel()->GetInput()->isUp() && not hero->m_collisionInfo.isInAir(hero->getPosition()))
    {
        LevelExitTrigger::hit(dir,player);
    }
}

//----------------------
// private declarations
//----------------------

void DoorExitTrigger::customUpdate()
{
}
